<template>
	<!--pages/user_wallet/user_wallet.wxml-->
	<view class="user-wallet">
		<view class="contain mb20 bg-white">
			<view class="header">
				<view class="header-totle">
					<text class="header-totle-name">总资产（元）</text>
					<text class="header-totle-count">{{wallet.user_money}}</text>
				</view>
				<view class="row row-center">
					<navigator 
					  hover-class="none"
					  url="/bundle/pages/user_withdraw/user_withdraw" 
					  class="row-center header-button header-button-withdraw" 
					  size="xs"
					>去提现</navigator>
					<navigator v-if="wallet.open_racharge" 
					  hover-class="none" 
					  url="/bundle/pages/user_payment/user_payment" 
					  class="row-center header-button header-button-payment" 
					  style="margin-left: auto;"
					  size="xs"
					>去充值</navigator>
				</view>
			</view>

			<view class="nav row">
	<!-- 			<navigator class="nav-item column-center" hover-class="none" url="/bundle/pages/balance_transfer/balance_transfer">
					<image class="nav-item-image" src="/bundle/static/images/icon_yezz.png"></image>
					<view class="mt10">余额转账</view>
				</navigator> -->
				<navigator class="nav-item column-center" hover-class="none"
					url="/bundle/pages/user_bill/user_bill?type=0">
					<image class="nav-item-image" src="/bundle/static/images/icon_zhmx.png"></image>
					<view class="mt10">账户明细</view>
				</navigator>
				<!-- 			<navigator class="nav-item column-center" hover-class="none" url="/bundle/pages/transfer_record/transfer_record">
			    <image class="nav-item-image" src="/bundle/static/images/icon_zzjl.png"></image>
			    <view class="mt10">转账记录</view>
			</navigator> -->
				<navigator class="nav-item column-center" hover-class="none"
					url="/bundle/pages/recharge_code/recharge_code">
					<image class="nav-item-image" src="/bundle/static/images/icon_czjl.png"></image>
					<view class="mt10">充值记录</view>
				</navigator>
				<navigator class="nav-item column-center" hover-class="none"
					url="/bundle/pages/user_withdraw_code/user_withdraw_code">
					<image class="nav-item-image" src="/bundle/static/images/icon_zzjl.png"></image>
					<view class="mt10">提现记录</view>
				</navigator>
			</view>
		</view>

<!-- 		<view class="activity bg-white">
			<view class="activity-title xl row">
				<view class="mr20" style="width: 6rpx;height: 30rpx;background-color: #24A3FF;"></view> 热门活动
			</view>
			<view class="activity-item row-between">
				<view>
					<view class="xl normal" style="font-weight: 500;">会员积分 限时兑换</view>
					<view class="muted sm mt10">积分签到抵现金</view>
					<navigator class="br60 white join-btn row-center" url="/bundle/pages/user_sign/user_sign"
						hover-class="none">立即参与</navigator>
				</view>
				<image style="width:274rpx;height: 210rpx;" src="/bundle/static/images/img_activity_jifen.png"></image>
			</view>
		</view> -->
	</view>
</template>

<script>
	// +----------------------------------------------------------------------
	// | LikeShop100%开源免费商用电商系统
	// +----------------------------------------------------------------------
	// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
	// | 开源版本可自由商用，可去除界面版权logo
	// | 商业版本务必购买商业授权，以免引起法律纠纷
	// | 禁止对系统程序代码以任何目的，任何形式的再发布
	// | Gitee下载：https://gitee.com/likemarket/likeshopv2
	// | 访问官网：https://www.likemarket.net
	// | 访问社区：https://home.likemarket.net
	// | 访问手册：http://doc.likemarket.net
	// | 微信公众号：好象科技
	// | 好象科技开发团队 版权所有 拥有最终解释权
	// +----------------------------------------------------------------------
	// | Author: LikeShopTeam
	// +----------------------------------------------------------------------
	import {
		getWallet
	} from '@/api/user';
	export default {
		data() {
			return {
				wallet: {} // 钱包信息数据
			};
		},

		onShow() {
			// 获取钱包数据
			getWallet().then(res => {
				if (res.code == 1) {
					this.wallet = res.data
				}
			});
		},

		methods: {

		}
	};
</script>
<style scoped>
	.contain {
		padding: 20rpx 30rpx 36rpx;
	}

	.header {
		position: relative;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		height: 320rpx;
		padding: 30rpx;
		border-radius: 10px;
		background: linear-gradient(180deg, #619EFE, #3187FD);
	}
	
	.header-totle {
		display: flex;
		align-items: center;
		flex-direction: column;
	}
	
	.header-totle-name {
		font-size: 24rpx;
		color: #F2F2F2;
	}
	
	.header-totle-count {
		font-size: 76rpx;
		color: #FFFFFF;
	}

	.header-button {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 300rpx;
		height: 88rpx;
		border-radius: 10px;
		font-size: 28rpx;
		/* font-weight: 500; */
	}

	.header-button-withdraw {
		box-shadow: 0 0 0 1px #FFFFFF;
		color: #FFFFFF;
	}
	
	.header-button-payment {
		background-color: #FFFFFF;
		color: #24A3FF;
	}

	.nav-item {
		width: 25%;
		padding: 40rpx 0;
	}

	.nav-item-image {
		width: 52rpx;
		height: 52rpx;
	}

	.activity {
		padding: 40rpx 20rpx;
	}

	.activity-title {
		font-weight: bold;
	}

	.activity-item {
		padding: 15rpx 40rpx;
		margin-top: 34rpx;
		border-radius: 10px;
		// box-shadow: 0px 0rpx 20rpx rgba(0, 0, 0, 0.16);
		background-color: #E8F6FF;
	}

	.join-btn {
		height: 52rpx;
		width: 156rpx;
		margin-top: 24rpx;
		background-color: #619EFE;
	}
</style>
